package com.aaa.controller;

import com.aaa.pojos.*;
import com.aaa.service.ReportService;
import com.aaa.service.StudentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;


@RestController
@Slf4j
@RequestMapping("/report")
public class ReportController {
    @Resource
    private ReportService reportService;

    @GetMapping("/empJobData")
    public Result empJobData(){
        EmpJobReportData ejr=reportService.empJobData();
        log.info("data结果{}"+ejr);
        log.info("Result"+Result.success(ejr));
        return Result.success(ejr);
    }

    @GetMapping("/empGenderData")
    public Result empGenderData(){
        List<EmpGender> list =reportService.empGender();
        return Result.success(list);
    }

    @GetMapping("/studentDegreeData")
    public Result studentDegreeData(){
        List<StudentGender> list=reportService.degree();
        log.info("学员学历"+list);
        return Result.success(list);
    }

    @GetMapping("/studentCountData")
    public Result studentCountData(){
        StudentJobReportData stu=reportService.countData();
        return Result.success(stu);
    }
}
